import axios from "./axios";

export default {
  query: params =>
    axios({
      method: "get",
      url: "/api/order/get",
      params
    }),
  add: data =>
    axios({
      method: "post",
      url: "/api/order/add",
      data
    }),
  shanchu: goodsname =>
    axios({
      method: "dalete",
      url: "/api/order/delete/" + goodsname
    }),
  getall: () =>
    axios({
      method: "get",
      url: "/api/order/getall"
    }),
  update: (data, _id) =>
    axios({
      method: "put",
      url: "/api/order/modify/" + _id,
      data
    }),
  delete: id =>
    axios({
      method: "delete",
      url: "/api/order/delete/" + id
    })
};
